package com.pptv.mtbu.ottflow.action;

import java.util.List;
import java.util.Vector;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;


import com.opensymphony.xwork2.ActionContext;
import com.pptv.mtbu.common.exception.MtbuException;
import com.pptv.mtbu.ottflow.action.base.AdminBaseAction;
import com.pptv.mtbu.ottflow.domain.User;
import com.pptv.mtbu.ottflow.service.AdminManager;
import com.pptv.mtbu.ottflow.vo.PageBean;

public class UserModAction
    extends AdminBaseAction
{

    /**
     * 
     */
    private static final long serialVersionUID = -7349351867759162931L;

    static Logger logger = LoggerFactory.getLogger(UserModAction.class);
    
    private User oldUser;
    
    private int    id;
    
    public String execute()
            throws Exception
    {
        logger.info("execute");
    
        User user = mgr.findUsrById(getId());
        logger.info(user.toString());
        if(user==null){
            throw new MtbuException("wrong id");
        }
        setOldUser(user);
        return SUCCESS;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public User getOldUser() {
        return oldUser;
    }


    public void setOldUser(User oldUser) {
        this.oldUser = oldUser;
    }
}
